package com.zzcoder.mall.common.dto;

import com.zzcoder.mall.data.model.PmsProduct;
import com.zzcoder.mall.data.model.SmsCarousel;
import lombok.Data;

@Data
public class SmsCarouselWithProduct extends SmsCarousel {
    private PmsProduct product;

    public SmsCarouselWithProduct() {
    }

    public SmsCarouselWithProduct(SmsCarousel carousel) {
        if (carousel == null) {
            return;
        }
        this.setId(carousel.getId());
        this.setCreatorId(carousel.getCreatorId());
        this.setCreatedTime(carousel.getCreatedTime());
        this.setLastModifierId(carousel.getLastModifierId());
        this.setLastModifiedTime(carousel.getLastModifiedTime());
        this.setImgUrl(carousel.getImgUrl());
        this.setLinkUrl(carousel.getLinkUrl());
        this.setProductId(carousel.getProductId());
        this.setLinkType(carousel.getLinkType());
        this.setDisplay(carousel.getDisplay());
    }
}
